<!DOCTYPE html>
<html lang="en">
<head>
    <title>AGV调度演示</title>
	<meta charset="utf-8">
	<meta http-equiv="content-type" content="text/html;utf-8" />
	<meta name="keywords" content="agv" />
	<meta name="description" content="AGV" />
	<meta name="author" content="ttscm.com.cn" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<meta name="format-detection" content="telephone=no" />
	<script src="/srds/js/jquery-3.6.0.min.js"></script>

	<script>

		$(function() {

			
			$("#btnZflkmSet").click(function() {
				$("#areaExecuteStatus").css("color", "#000000");
				$("#areaExecuteStatus").text("正在发送信号...");
				let strUrl = "/srds/zflkm/setSignal/0/1";
				$.getJSON(strUrl, function(result) {
					if (result.code != 0) {
						$("#areaExecuteStatus").css("color", "#FF0000");
						$("#areaExecuteStatus").text("异常代码：" + result.code + "\n\n异常消息：" + result.message);
						return;
					}				

				});
			});

			$("#btnZflkmSet2").click(function() {
				$("#areaExecuteStatus").css("color", "#000000");
				$("#areaExecuteStatus").text("正在发送信号...");
				let strUrl = "/srds/zflkm/setSignal/0/2";
				$.getJSON(strUrl, function(result) {
					if (result.code != 0) {
						$("#areaExecuteStatus").css("color", "#FF0000");
						$("#areaExecuteStatus").text("异常代码：" + result.code + "\n\n异常消息：" + result.message);
						return;
					}
				});
			});
			
			$("#btnZflkmRead").click(function() {
				$("#areaExecuteStatus").css("color", "#000000");
				$("#areaExecuteStatus").text("正在读取信号...");
				let strUrl = "/srds/zflkm/readSignal/1/";
				$.getJSON(strUrl, function(result) {
					if (result.code != 0) {
						$("#areaExecuteStatus").css("color", "#FF0000");
						$("#areaExecuteStatus").text("异常代码：" + result.code + "\n\n异常消息：" + result.message);
						return;
					}				
					$("#areaExecuteStatus").css("color", "#000000");
					$("#areaExecuteStatus").text(result.data);
				});
			});
			
			$("#btnZflkmRead2").click(function() {
				$("#areaExecuteStatus").css("color", "#000000");
				$("#areaExecuteStatus").text("正在读取信号...");
				let strUrl = "/srds/zflkm/readSignal/1/";
				$.getJSON(strUrl, function(result) {
					if (result.code != 0) {
						$("#areaExecuteStatus").css("color", "#FF0000");
						$("#areaExecuteStatus").text("异常代码：" + result.code + "\n\n异常消息：" + result.message);
						return;
					}				
					$("#areaExecuteStatus").css("color", "#000000");
					$("#areaExecuteStatus").text(result.data);
				});
			});
			
		});
  </script>
</head>
<body style="font-size:100%;">
	<div id="container" style="border:0px solid #FF0000;margin:0px;padding:1px;">
		<div id="header" style="border:0px solid #00FF00;background-color:#C0C0C0;text-align:center;font-size:200%;margin:5px;padding:1px;">
			<b>调度演示</b>
		</div>

		<div id="content" style="border:0px solid #0000FF;background-color:#EEEEEE;margin:5px;padding:1px;">	
			<table style="width:100%;">
				<tr>
					<td style="width:30%;"><label for="txtCurrSite">当前站点：</label></td>
					<td style="width:70%;"><input id="txtCurrSite" type="text" style="width:95%;height:25px;" disabled="disabled" /></td>
				</tr>
				<tr>
					<td colspan="2" style="text-align:center;height:80px;">
						<button id="btnZflkmSet" type="button" style="width:100%;height:50px;background-color:red;">发送信号0-1</button>
						<button id="btnZflkmSet2" type="button" style="width:100%;height:50px;background-color:red;">发送信号0-2</button>
						
						<button id="btnZflkmRead" type="button" style="width:100%;height:50px;background-color:red;">读取信号1-1</button>
						<button id="btnZflkmRead2" type="button" style="width:100%;height:50px;background-color:red;">重置信号1-2</button>
					</td>
				</tr>
				<tr>
					<td>
						<label for="areaExecuteStatus" >执行状态：</label>
					</td>
					<td style="text-align:center;">
						<textarea id="areaExecuteStatus" style="width:95%;min-height:400px;font-size:150;font-weight:bold;color:#000000%" disabled="disabled"></textarea>
					</td>
				</tr>
			</table>
		</div>

		<div id="footer" style="border:0px solid #00FF00;background-color:#C0C0C0;text-align:center;margin:5px;padding:1px;">
			版权 &#169 天天供应链 &#8226 天天智能科技
		</div>
	</div>
</body>
</html>